<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<!-- enctype="multipart/form-data" -->
<script language="JavaScript">    	
	    function checkIt() {
			var f = document.pofol;
			var ischecked = null;
			for(i=0; i<f.file_area.length; i++) {
				if(f.file_area[i].checked) {
		            ischecked = true;
		            break;
		        }
			}
			if(ischecked) {
				if(!f.file.value)
		        {
		            alert("파일을 등록하세요");
		            return false;
		        }
				else {
					f.submit();
				}
			}
			else {
				alert("분야를 선택하세요" + f.file_area.value);	
				return false;
			}
			
	        
	    }
</script>

<form method="post" name="pofol" action="fileReg.html" enctype="multipart/form-data" onsubmit="return checkIt()">
<div id="main" class="site-main">
	<div class="full-container">		
<div id="primary" class="content-area">
	<div id="content" class="site-content">
		<div class="entry-content">
		<center>		

			<div class="panel-grid" id="pg-home-0">
				<div class="text" id="content">
				<h1><b>종류 선택</b></h1><br><br>
					<input type=radio name="file_kind" value='a' checked>이력서 &emsp;&emsp;
   					<input type=radio name="file_kind" value='b'>포트폴리오
				</div>
			</div>
			<br>
			<hr>
			<div class="panel-grid" id="pg-home-0">
				<div class="text" id="content">
				<h1><b>분야 선택</b></h1><br><br>
					<input type=radio name="file_area" value='1'>전체 &emsp;
					<input type=radio name="file_area" value='2'>웹 개발자 &emsp;
   					<input type=radio name="file_area" value='3'>앱 개발자 &emsp;
   					<input type=radio name="file_area" value='4'>네트워크 관리자 &emsp;
   					<input type=radio name="file_area" value='5'>서버 관리자 &emsp;
   					<input type=radio name="file_area" value='6'>보안 전문가 &emsp;
   					<input type=radio name="file_area" value='7'>DB 관리자
				</div>
			</div>
			<br>
			<hr>
			<div class="panel-grid" id="pg-home-0">
				<div class="text" id="content">
				<h1><b>파일 선택</b></h1><br><br>
					<input type=file name="file">
				</div>
			</div>
			<br>
			<hr>
			<div class="panel-grid" id="pg-home-0">
				<div class="text" id="content">
					<input type=submit value="등록">&emsp;<input type=reset value="취소">
				</div>
			</div>
		</center>
		</div>
	</div>
</div>
	</div>
</div>
</form>
